Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove blocking call in async_update #32

Merged
merged 5 commits into from
Oct 14, 2024
Merged

Conversation

aallen90
Copy link
Contributor

My HA instance (v2024.10.1) lists a warning for the PoolMath integration that a blocking call was detected in client.py's async_update on line 73.

This PR updates the async_update function to use non-blocking I/O when fetching data from the PoolMath API, using the aiohttp library described in the HA dev docs.

Tested on 2024.10.1 and confirmed HA no longer logs this warning when async_update is called.

Happy to rebase if #30 is merged first!

@rsnodgrass
Copy link
Owner

Can you rebase? I'm just going to push #30 through since it is nice to configure via UI.

We will release #30 as a breaking change new X version, since it doesn't pickup the previous pool id from config.

@rsnodgrass
Copy link
Owner

And...you rock! Thanks for contributing.

@rsnodgrass rsnodgrass merged commit 5295f8f into rsnodgrass:master Oct 14, 2024
@rsnodgrass
Copy link
Owner

@aallen90 Are we ready to cut a new release?

@aallen90
Copy link
Contributor Author

@aallen90 Are we ready to cut a new release?

I think it's close! I'm testing the upgrade and process. So far, the only hiccup is needing to set it up again. It does trigger a "Repair" issue, so at least there is visibility.

If there's a risk of being inundated by "my integration stopped working?!?!" comments, it might be worth implementing the Config entry migration. If that's not a concern, this could be ignored.

We may find a good PR reference to imitate in past HA release notes under the "Integrations now available to setup from the UI" section.

image

@rsnodgrass
Copy link
Owner

Config entry migration would be awesome, but I don't have time to implement this unfortunately. Too many other commitments right now.

We will probably have 1000 people updating and then scratch head why integration is breaking in meantime. I turned off Issues for this github repo so it forces them to interact with the community in cases of problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants